package com.wyh.cloud.service;

import com.wyh.cloud.service.fallback.PaymentServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author wyh
 * @version 1.0
 * @date 2021/11/17 16:12
 */
@Service
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT" ,fallback = PaymentServiceFallback.class)
public interface PaymentService {
    @GetMapping(value = "/payment/hystrix/infoOK/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id);

    @GetMapping(value = "/payment/hystrix/infoTO/{id}")
    public String paymentInfo_Timeout(@PathVariable("id") Integer id);
}
